package com.ytf.test.tenth;

/**
 * @author: YTF
 * @date: 2025/2/22 9:34
 * @version: 1.0
 * @description:
 */
public class Parcel4 {
    private class PContents implements Contents{

        private int i = 11;
        @Override
        public int value() {
            return i;
        }
    }
    protected class PDestination implements Destination{
        private String label;

        public PDestination(String label) {
            this.label = label;
        }

        @Override
        public String readLabel() {
            return label;
        }
    }
    public Destination destination(String s){
        return new PDestination(s);
    }
    public Contents contents(){
        return new PContents();
    }
}
class TestParcel{
    public static void main(String[] args) {
        Parcel4 parcel4 = new Parcel4();
        Contents contents = parcel4.contents();
        Destination tasmania = parcel4.destination("Tasmania");
        //! parcel4.new PContents();
        parcel4.new PDestination("str");
    }
}
